<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript" src="js/jquery.itextclear.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], textarea', '.form').iTextClear();
    });
</script>
<!-- jQplot CSS -->

<link rel="stylesheet" media="screen" href="${ctx}/css/Tree.css"/>
<!-- jQplot CSS END -->

<!-- DATATABLES CSS -->
<link rel="stylesheet" media="screen" href="lib/datatables/css/vpad.css"/>
<script type="text/javascript" src="lib/datatables/js/jquery.dataTables.js"></script>
<!-- DATATABLES CSS END -->

<h1 class="page-title">合同签订审核</h1>

<div class="container_12 clearfix leading">

    <div class="tabs side grid_8 leading">

        <div class="grid_12">
            <div id="demo" class="clearfix">
                <table class="display" id="example">
                    <thead>
                    <tr>
                        <th>工号</th>
                        <th>姓名</th>
                        <th>部门</th>
                        <th>职务</th>
                        <th>合同类别</th>
                        <th>合同状态</th>

                    </tr>
                    </thead>
                    <tbody>
                    <s:if test="#request.pojo2s == null or #request.pojo2s.size() == 0">
                        <tr>
                            <td>没有数据</td>
                        </tr>
                    </s:if>
                    <s:iterator value="#request.pojo2s" var="csp" status="sta">
                        <s:if test="#sta.even"> <tr class="gradeA"> </s:if><s:else><tr class="gradeC"></s:else>
                        <td>${csp.work.workNo}</td>
                        <td>${csp.work.baseId.name}</td>
                        <td>${csp.work.organization.fullName}</td>
                        <td>${csp.work.duty.dutyName}</td>
                        <td>${csp.versionNames}</td>
                        <td>
                            <s:if test="#request.csp.status==0">
                                <s:if test="#request.type == 'view'">
                                    <a class="button"> <span style="background:url(${ctx}/images/img/page_delete.png)" class="icon icon-ok">&nbsp;</span>生成合同(${csp.contractCount})</a>
                                </s:if>
                                <s:else>
                                <a class="button" href="#contract/audit_detail.xhtml?signPojo.work.id=${csp.work.id}&t=<%=new java.util.Date().getTime()%>">
                                    <span style="background:url(${ctx}/images/img/page_delete.png)" class="icon icon-ok">&nbsp;</span>生成合同(${csp.contractCount})
                                </a>
                                </s:else>
                            </s:if>
                            <s:elseif test="#request.csp.status==1">
                                <s:if test="#request.type == 'view'">
                                    <a class="button"> <span style="background:url(${ctx}/images/img/script_error.png)" class="icon icon-ok">&nbsp;</span>未审核(${csp.contractCount})</a>
                                </s:if>
                                <s:else>
                                <a class="button" href="#contract/audit_detail.xhtml?signPojo.work.id=${csp.work.id}&t=<%=new java.util.Date().getTime()%>">
                                    <span style="background:url(${ctx}/images/img/script_error.png)" class="icon">&nbsp;</span>未审核(${csp.contractCount})
                                </a>
                                </s:else>
                            </s:elseif>
                            <s:elseif test="#request.csp.status == 2">
                                <s:if test="#request.type == 'view'">
                                    <a class="button"> <span style="background:url(${ctx}/images/img/page_gear.png)" class="icon icon-ok">&nbsp;</span>审核中(${csp.contractCount})</a>
                                </s:if>
                                <s:else>
                                <a class="button" href="#contract/audit_detail.xhtml?signPojo.work.id=${csp.work.id}&t=<%=new java.util.Date().getTime()%>">
                                    <span style="background:url(${ctc}/images/img/page_gear.png)" class="icon icon-ok">&nbsp;</span>审核中(${csp.contractCount})
                                </a>
                                </s:else>
                            </s:elseif>
                            <s:elseif test="#request.csp.status == 3">
                                <s:if test="#request.type == 'view'">
                                    <a class="button"> <span style="background:url(${ctx}/images/img/page_gear.png)" class="icon icon-ok">&nbsp;</span>未签(${csp.contractCount})</a>
                                </s:if>
                                <s:else>
                                    <a class="button" href="#contract/audit_detail.xhtml?signPojo.work.id=${csp.work.id}&t=<%=new java.util.Date().getTime()%>">
                                        <span style="background:url(${ctc}/images/img/page_gear.png)" class="icon icon-ok">&nbsp;</span>未签(${csp.contractCount})
                                    </a>
                                </s:else>
                            </s:elseif>
                            <s:elseif test="#request.csp.status == 4">
                                <s:if test="#request.type == 'view'">
                                    <a class="button"> <span style="background:url(${ctx}/images/img/accept.png)" class="icon icon-ok">&nbsp;</span>已签(${csp.contractCount})</a>
                                </s:if>
                                <s:else>
                                <a class="button" href="#contract/audit_detail.xhtml?signPojo.work.id=${csp.work.id}&t=<%=new java.util.Date().getTime()%>">
                                    <span style="background:url(${ctx}/images/img/accept.png)" class="icon icon-ok">&nbsp;</span>已签(${csp.contractCount})
                                </a>
                                </s:else>
                            </s:elseif>
                            <s:elseif test="#request.csp.status == 5">
                                <s:if test="#request.type == 'view'">
                                    <a class="button"> <span style="background:url(${ctx}/images/img/accept.png)" class="icon icon-ok">&nbsp;</span>续签(${csp.contractCount})</a>
                                </s:if>
                                <s:else>
                                <a class="button" href="#contract/audit_detail.xhtml?signPojo.work.id=${csp.work.id}&t=<%=new java.util.Date().getTime()%>">
                                    <span style="background:url(${ctx}/images/img/accept.png)" class="icon icon-ok">&nbsp;</span>续签(${csp.contractCount})
                                </a>
                                </s:else>
                            </s:elseif>
                            <s:elseif test="#request.csp.status == 7">
                                <s:if test="#request.type == 'view'">
                                    <a class="button"> <span style="background:url(${ctx}/images/img/accept.png)" class="icon icon-ok">&nbsp;</span>已续签(${csp.contractCount})</a>
                                </s:if>
                                <s:else>
                                    <a class="button" href="#contract/audit_detail.xhtml?signPojo.work.id=${csp.work.id}&t=<%=new java.util.Date().getTime()%>">
                                        <span style="background:url(${ctx}/images/img/accept.png)" class="icon icon-ok">&nbsp;</span>已续签(${csp.contractCount})
                                    </a>
                                </s:else>
                            </s:elseif>
                        </td>

                        </tr>
                    </s:iterator>
                    </tbody>
                </table>
            </div>
            <div class="form-action clearfix">
                <p>
                    <%@ include file="/WEB-INF/pages/common/main_pager.jsp" %>
                </p>
            </div>
        </div>
    </div>
</div>

<div class="clear"></div>


<script type="text/javascript" src="js/Tree.js"></script>
